package group.program.Controller;

import group.program.Service.EmbeddingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;

@RestController
public class EmbeddingController {
    @Autowired
    private EmbeddingService embeddingService;
    @PostMapping("/embedding")
    public String embedding(@RequestParam("file") MultipartFile file){
        return embeddingService.textVectorization(file);
    }
}
